<?php 
	$id=$_GET['id'];
	$sql="SELECT * FROM tailieu WHERE id='$id'";
	$spql=$dp->QueryOne($sql);
	$trangthai=$spql['states'];
	$states=($trangthai==1)?0:1;
	$sqlup="UPDATE tailieu SET states='$states' WHERE id='$id'";
	mysql_query($sqlup);
	header("Location: index.php?option=tailieu");
?>